package fem2.element.crack_sda;

import inf.jlinalg.IMatrix;
import fem2.MaterialModel;
import fem2.MeshPart;
import fem2.enu.StressType;
import fem2.material.cohesive_law.CohesiveLaw;

public class SKONConstantJumpCSTElement extends KOSConstantJumpCSTElement {

	public SKONConstantJumpCSTElement(MeshPart mp, MaterialModel mm, CohesiveLaw cl) {
		super(mp, mm, cl);
	}

	public SKONConstantJumpCSTElement(MeshPart mp, MaterialModel mm, CohesiveLaw cl,
			StressType stressType) {
		super(mp, mm, cl, stressType);
	}

	@Override
	protected void computeProjectionOperator(MeshPart mp, IMatrix g, double... xi) {
		double c = -crackMeasure / elementMeasure;
		g.set(0, 0, c * normal[0]);
		g.set(1, 1, c * normal[1]);
		g.set(2, 0, c * normal[1]);
		g.set(2, 1, c * normal[0]);
	}

}
